import http from "@/http"
import { Menu } from "./MenuModel"

export const getParentApi = ()=>{
    return http.get("/api/menu/getParent")
}


export const addApi = (parm: Menu) => {
    return http.post("/api/menu", parm)
}

export const listApi = () =>{
    return http.get("/api/menu/list")
}

//编辑
export const editApi = (parm: Menu) => {
    return http.put("/api/menu", parm)
}
//删除
export const deleteApi = (parm: Menu) => {
    return http.delete(`/api/menu/${parm.menuId}`)
}